﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon.OAEnums;

namespace BCDto.OA.WorkflowTemplate.WorkflowTemplateFormCustomDatabaseTableColumn
{
	/// <summary>
	/// 工作流模板表单自定义数据库表集合列
	/// </summary>
	public class WorkflowTemplateFormCustomDatabaseTableColumnRequestDto
	{
		/// <summary>
		/// 列注释
		/// </summary>		
		[Display(Name = "列注释")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string ColumnComment { get; set; }
		/// <summary>
		/// 列名称
		/// </summary>		
		[Display(Name = "列名称")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string ColumnName { get; set; }
		/// <summary>
		/// 列类型
		/// </summary>		
		[Display(Name = "列类型")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public OAColumnType ColumnType { get; set; }
		/// <summary>
		/// 值
		/// </summary>		
		[Display(Name = "值")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public string Value { get; set; }

		/// <summary>
		/// 长度
		/// </summary>		
		[Display(Name = "长度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public int Length { get; set; }
		/// <summary>
		/// 是否自增Id
		/// </summary>		
		[Display(Name = "是否自增Id")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsAutoIncrement { get; set; }
		/// <summary>
		/// 是否主键
		/// </summary>		
		[Display(Name = "是否主键")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsPrimaryKey { get; set; }
		/// <summary>
		/// 是否必填
		/// </summary>		
		[Display(Name = "是否必填")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsNotNull { get; set; }
	}
}

